package com.itheima.mString;

import java.util.Scanner;

/*
    字符串遍历
 */
public class StringDemo021 {
    public static void main(String[] args) {
        //1.键盘录入一个字符串,用Scanner输入
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        //2.定义一个字符串数组去实现分割字符串的功能
        char[] c = s.toCharArray();
        for (int i = 0; i < c.length; i++) {
            System.out.print(c[i]);
        }
        System.out.println();
        System.out.println(c);
    }
}
